package com.jf.blogbackened.mapper;

import com.jf.blogbackened.bean.Admin;
import com.jf.blogbackened.bean.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface UserMapper {
    public Admin getAdminByUsernameAndPwd(Admin admin);

    Integer getCount(User params);

    List<User> getPageData(@Param("params")  User params, @Param("offset")  Integer offset, @Param("pageSize")Integer pageSize);

    int getCountByNickname(String nickname);

    int insert(User user);

    User getUserById(Integer id);

    int update(User user);

    Integer deleteUserById(Integer id);

    List<User> getAllUsers();
}
